#ifndef _SPRING_D_LAYOUTVM_H_
#define	_SPRING_D_LAYOUTVM_H_

#include "Basic_Dynamic_lyvm.h"
#include "Animable.h"
#include "PositionMoveState.h"

class Link{
public:
	DIVA_VM* fromVM;
	DIVA_VM* toVM;
};

class Spring_Dynamic_lyvm : public Basic_Dynamic_lyvm, Animable{
	float _spring_factor;
	float _friction;
	float _spring_length;
	float _animation_speed;
	float _animation_rate;
	std::map<Link*, PositionMoveState*> anis;
	void createSprForceFromVMtoVMs(DIVA_VM* , std::vector<DIVA_VM*> );
public:
	Spring_Dynamic_lyvm();
	string getDescription() { return "This is a Layout-VM Example.";}
	void setupParameters();
	void setupDialog();
	void layout(std::vector<DIVA_VM*>,DIVA_VM*);
	void behavior(float);
};

#endif